package com.ajx.platform.buildingmronitor.websocket;

import javolution.io.Struct;

import java.nio.ByteOrder;

public class SJHLPRIPCProtocol {
	
	static class SJHLPRIPCConstant {
		public static final int SJH_SUCCESS 			= 0;
		public static final int SJH_FAILURE 			= -1;

		public static final int HEATBEAT_INTERVAL 		= 5 * 1000;  			// 5's
		public static final int MAX_WEBSOCKET_SERVER 	= 8;

		public static final int SJH_DEV_SN_MAX			 = 32;
		public static final int SJH_LICENSE_MAX			 = 16;
		public static final int SJH_LICENSE_COLOR_MAX	 = 8;
		public static final int SJH_IPV4_MAX			 = 32;
		public static final int SJH_MESSAGE_MAX			 = 64;
		public static final int SJH_URL_MAX				 = 128;
		public static final int SJH_LPR_REGION_POINTS	 = 16;
		public static final int SJH_VERSION_MAX			 = 32;
		public static final int SJH_MAC_ADDR_LEN      	 = 20;
		public static final int SJH_PARKING_ID_LEN		 = 32;
		public static final int SJH_STATUS_INFO_LEN		 = 128; 					// 16 * SJH_VIP_BAT_ITEMS_COUNT
		public static final int SJH_STATUS_VIP_INFO_LEN  = 1024;
		public static final int SJH_SCREEN_LINE_MAX		 = 4;  					//最大支持4行屏
		public static final int SJH_VIP_BAT_ITEMS_COUNT  = 64;
		public static final int SJH_VIP_CAP_STATUS_START = 1000000;
		public static final int SJH_MAX_PLATE_NUM		 = 8;
		public static final int SJH_LOG_MSG_LEN			 = 128;
		public static final int SJH_MATCH_ITEM_MAX		 = 64;
		public static final int SJH_USER_DATA_LEN		 = 32;					// 用户数据最长28个字节
		public static final int SJH_MUL_CAM_DATA_OFF	 = SJH_USER_DATA_LEN;		// |32 user data| 420 mul cam|60 websocket pre|
		public static final int SJH_MULTI_CAM_PORT		 = 7060;
		public static final int SJH_CAP_MULTI_MAX_COUNT	 = 4;
		public static final int SJH_UPDATE_V4_OFFSET	 = 64;

		public static final int SJH_WEBSOCKET_SEND_BUF_LENGTH	= 1 * 1024 * 1024;


		public static final int SJH_SYNC_BYTES			= 0xCDDCCDDC;
		public static final int SJH_IPC_VERSION			= 0x01010000; 
	}  
	
	public static enum SJH_FUNCTION_CMD_E
	{
		SJH_NET_DEV_MSG_WS_LOG(0x9F),				// Websocket Log
		SJH_NET_DEV_MSG_SN_REQ(0xA0),    			// 设备序列号请求
		SJH_NET_DEV_MSG_SN_RES(0xA1),				// 设备序列号应答
		SJH_NET_DEV_MSG_HEATBEAT(0xA2),				// 心跳帧
		SJH_NET_DEV_MSG_CAPTURE_REQ(0xA3),			// 抓拍请求
		SJH_NET_DEV_MSG_OPEN_DOOR_REQ(0xA4),		// 开门请求
		SJH_NET_DEV_MSG_LINCENSE_RESULT(0xA5),		// 车牌结果
		SJH_NET_DEV_MSG_DISPLAY_MSG_REQ(0xA6),		// 显示屏消息
		SJH_NET_DEV_MSG_GET_PARAM_REQ(0xA7),		// 获得参数请求[上位机->ipc]
		SJH_NET_DEV_MSG_GET_PARAM_RES(0xA8),		// 获得参数应答[ipc->上位机]
		SJH_NET_DEV_MSG_SET_PARAM_REQ(0xA9),		// 设置参数请求
		SJH_NET_DEV_MSG_SET_PARAM_RES(0xAA),		// 设置参数应答
		SJH_NET_DEV_MSG_UPGRATE_STATUS(0xAB),      // 升级状态
		SJH_NET_DEV_MSG_VIP_STATUS(0xAC),			// vip 状态
		SJH_NET_DEV_MSG_RESTART(0xAD),				// 重启
		SJH_NET_DEV_MSG_DEV_STATUS(0xAE),			// 设备状态
		SJH_NET_DEV_MSG_CLOSE_DOOR_REQ(0xAF),		//关闸信号	
		SJH_NET_DEV_MSG_LINCENSE_RESULT_RES(0xB0),		// server->ipc 说明服务器是否接收到了车牌
		SJH_NET_DEV_MSG_RESERVE_1(0xCD),
		SJH_NET_DEV_MSG_RESERVE_2(0xDC);
				
		private int nValue;
		// 构造方法
        private SJH_FUNCTION_CMD_E(int nValue) {           
            this.nValue = nValue;
        }
	};
	
	public static enum SJH_NET_DEV_PARAM_CMD_E
	{
		SJH_NET_DEV_PARAM_SCENE(0xB1),				// 场景模式
		SJH_NET_DEV_PARAM_RECOG_PARAM(0xB2),		// 识别参数
		SJH_NET_DEV_PARAM_SOFT_LENS(0xB3),			// 镜头
		SJH_NET_DEV_PARAM_IMAGE_PARAM(0xB4),		// 图像参数
		SJH_NET_DEV_PARAM_LIGHT(0xB5),				// 灯亮度
		SJH_NET_DEV_PARAM_WEBSOCKET(0xB6),			// websocket链接
		SJH_NET_DEV_PARAM_LED_SCREEN_PARM(0xB7),	// led screen 参数
		SJH_NET_DEV_PARAM_DATE_TIME(0xB8),			// time
		SJH_NET_DEV_PARAM_VERSION_INFOS(0xB9),		// version 
		SJH_NET_DEV_PARAM_NET_CONFIG(0xBA),			// net config
		SJH_NET_DEV_PARAM_PARKING_ID(0xBB), 		// Parking ID
		SJH_NET_DEV_PARAM_WORK_MODE(0xBC),			// 工作模式
		SJH_NET_DEV_PARAM_VIP_ADD(0xC1),			// VIP add
		SJH_NET_DEV_PARAM_VIP_DEL(0xC2),			// VIP delete	
		SJH_NET_DEV_PARAM_VIP_ADD_SAVE(0xC3),
		SJH_NET_DEV_PARAM_VIP_SAVE(0xC4),		    // VIP add batch
		SJH_NET_DEV_PARAM_VIP_CLEAR(0xC5),			// clear vip table
		SJH_NET_DEV_PARAM_VIP_COUNT(0xC6), 			// VIP count
		SJH_NET_DEV_PARAM_VIP_ITEMS(0xC7),         // VIP get items(start, start + items)
		SJH_NET_DEV_PARAM_VIP_PRIORITY(0xC8),      // VIP 优先级,   0 不开启vip权限, 1, 当短网时， 自动启用vip, 0xFF vip 先开闸， 然后再通知	
		SJH_NET_DEV_PARAM_UPGRADE_URL(0xC9),	    // 升级URL
		SJH_NET_DEV_PARAM_MUL_CAP_PARAM(0xCA),		// 设置抓拍参数
		SJH_NET_DEV_PARAM_GET_IMAGE(0xCB),         // 获得图片信息
		SJH_NET_DEV_PARAM_OPEN_FIRST(0xCC),			// 开闸优先
		SJH_NET_DEV_PARAM_RESERVE_1(0xCD),	
		SJH_NET_DEV_PARAM_MEM_LOG(0xCE),			// 获得内存日志
		SJH_NET_DEV_PARAM_FLASH_LOG(0xCF),			// 获得Flash日志
		SJH_NET_DEV_PARAM_PLATE_MATCH(0xD0),		// 匹配规则 
		SJH_NET_DEV_PARAM_PLATE_MATCH_CLEAR(0xD1),	// 清空匹配规则 
		SJH_NET_DEV_PARAM_WS_LOG(0xD2),				// websocket log
		SJH_NET_DEV_PARAM_IMAGE_ASK(0xD3), 			// 图片接收应答参数
		SJH_NET_DEV_PARAM_RESERVE_2(0xDC);
		
		private int nValue;
		// 构造方法
        private SJH_NET_DEV_PARAM_CMD_E(int nValue) {           
            this.nValue = nValue;
        }
	};
	
	public static class SJH_PACKET_HEADER extends Struct {
        public final Unsigned32 nSync = new Unsigned32();		//同步字
        public final Unsigned32 nVersion = new Unsigned32();	//版本号
        public final Unsigned8 nFlag   = new Unsigned8();		//标志位，是否回应,0不回应，1回应
        public final Unsigned8 nType   = new Unsigned8();		//保留，信令子类型
        public final Unsigned8 nRev1   = new Unsigned8();		//保留，相机串口号
        public final Unsigned8 nRev2   = new Unsigned8();		//保留
        public final Unsigned32 nCmdID = new Unsigned32();		//信令类型
        public final Unsigned32 nLength = new Unsigned32();		//后面所带数据长度
        
        public ByteOrder byteOrder()
        {
        	return ByteOrder.LITTLE_ENDIAN;        	
        }
    };
	
    
    public static class SJH_NET_DEV_SN_VER extends Struct {
    	public final UTF8String szSN  = new UTF8String(SJHLPRIPCConstant.SJH_DEV_SN_MAX);
    	public final UTF8String szVer = new UTF8String(SJHLPRIPCConstant.SJH_VERSION_MAX);
    };
		    
    public static class SJH_NET_DEV_PARKING_ID extends Struct {	
		public final Signed8[] szParkingID   = array(new Signed8[SJHLPRIPCConstant.SJH_PARKING_ID_LEN]);
	};
	
	public static class SJH_LICENSE_RESULT extends Struct {
		public final UTF8String szSN   = new UTF8String(SJHLPRIPCConstant.SJH_DEV_SN_MAX);
		public final Unsigned8 ucCarBright   = new Unsigned8();		// 亮度
		public final Unsigned8 ucCarColor   = new Unsigned8();		// 颜色
		public final Unsigned8 ucColorType   = new Unsigned8();		// 颜色类型	
		public final Unsigned8 ucConfidence   = new Unsigned8();	// 可信度
		public final Unsigned8 ucDirect   = new Unsigned8();		// 方向
		public final Unsigned8 ucTriggerType   = new Unsigned8();	// 触发类型 
		public final Unsigned8 ucType   = new Unsigned8();			// 类型	
		public final Unsigned8 ucRev   = new Unsigned8();			// 保留
		public final Unsigned32 dwImageBigFileLen = new Unsigned32();	// 大图
		public final Unsigned32 dwImageSmallFileLen = new Unsigned32();	// 小图
		public final Unsigned32 dwTimeUsed = new Unsigned32();			// 用时
		
		// 车牌号码
		public final Unsigned8[] szLicense = array(new Unsigned8[SJHLPRIPCConstant.SJH_LICENSE_MAX]);
		// 车牌颜色
		public final Unsigned8[] szColor   = array(new Unsigned8[SJHLPRIPCConstant.SJH_LICENSE_COLOR_MAX]);
		// 车牌号码
		//public final UTF8String szLicense = new UTF8String(SJHLPRIPCConstant.SJH_LICENSE_MAX);
		// 车牌颜色
		//public final UTF8String szColor   = new UTF8String(SJHLPRIPCConstant.SJH_LICENSE_COLOR_MAX);
		
		
		// 车牌位置x,y, width, height
		public final Unsigned32 dwLicenseX = new Unsigned32();	
		public final Unsigned32 dwLicenseY = new Unsigned32();	
		public final Unsigned32 dwLicenseWidth = new Unsigned32();	
		public final Unsigned32 dwLicenseHeight = new Unsigned32();	
		
		// 设备名称
		public final UTF8String szDevName = new UTF8String(SJHLPRIPCConstant.SJH_DEV_SN_MAX);
		// 设备ID
		public final UTF8String szDevID   = new UTF8String(SJHLPRIPCConstant.SJH_DEV_SN_MAX);
		// 0 : 正常数据 1: 相机内部vip开闸
		public final Signed32 nStatus 	 = new Signed32();	
		public final Unsigned8[] u8Res   	= array(new Unsigned8[64]);		
	};
	
	public static class SJH_LICENSE_RESULT_MULTI_CAP extends Struct {
		public final Signed8[] szSN   = array(new Signed8[SJHLPRIPCConstant.SJH_DEV_SN_MAX]);
		public final Unsigned8 ucCarBright   = new Unsigned8();		// 亮度
		public final Unsigned8 ucCarColor   = new Unsigned8();		// 颜色
		public final Unsigned8 ucColorType   = new Unsigned8();		// 颜色类型	
		public final Unsigned8 ucConfidence   = new Unsigned8();	// 可信度
		public final Unsigned8 ucDirect   = new Unsigned8();		// 方向
		public final Unsigned8 ucTriggerType   = new Unsigned8();	// 触发类型 
		public final Unsigned8 ucType   = new Unsigned8();			// 类型	
		public final Unsigned8 ucRev   = new Unsigned8();			// 保留
		public final Unsigned32 dwImageBigFileLen = new Unsigned32();	// 大图
		public final Unsigned32 dwImageSmallFileLen = new Unsigned32();	// 小图
		public final Unsigned32 dwTimeUsed = new Unsigned32();			// 用时
		
		// 车牌号码
		public final Signed8[] szLicense = array(new Signed8[SJHLPRIPCConstant.SJH_LICENSE_MAX]);
		// 车牌颜色
		public final Signed8[] szColor   = array(new Signed8[SJHLPRIPCConstant.SJH_LICENSE_COLOR_MAX]);
		
		// 车牌位置x,y, width, height
		public final Unsigned32 dwLicenseX = new Unsigned32();	
		public final Unsigned32 dwLicenseY = new Unsigned32();	
		public final Unsigned32 dwLicenseWidth = new Unsigned32();	
		public final Unsigned32 dwLicenseHeight = new Unsigned32();	
		
		// 设备名称
		public final Signed8[] szDevName = array(new Signed8[SJHLPRIPCConstant.SJH_DEV_SN_MAX]);
		// 设备ID
		public final Signed8[] szDevID   = array(new Signed8[SJHLPRIPCConstant.SJH_DEV_SN_MAX]);
		// 0 : 正常数据 1: 相机内部vip开闸
		public final Signed32 nStatus 	 = new Signed32();	
		
		
		public final Signed32 nPicCount 	 = new Signed32();
		public final Unsigned32[] adwImageBigFileLen   	= array(new Unsigned32[SJHLPRIPCConstant.SJH_CAP_MULTI_MAX_COUNT]);
		public final Unsigned32[] adwImageSmallFileLen 	= array(new Unsigned32[SJHLPRIPCConstant.SJH_CAP_MULTI_MAX_COUNT]);
		
		public final Unsigned8[] u8Res   	= array(new Unsigned8[64]);
	};
	
	public static class SJH_NET_DEV_WORK_MODE extends Struct {
		public final Unsigned8 ucCheckMode   = new Unsigned8();
		public final Unsigned8 ucCapDirect   = new Unsigned8();
		public final Unsigned8 ucNotDowithNoPlate   = new Unsigned8();
		public final Unsigned8 ucDevType   = new Unsigned8();
		public final Unsigned8 ucEnableWhiteList   = new Unsigned8();
		public final Unsigned8[] ucRev   	= array(new Unsigned8[3]);
	};
	
	public static class SJH_NET_DEV_SCENE_MODE extends Struct {
		public final Unsigned8 ucSceneMode   = new Unsigned8();			//场景模式
		public final Unsigned8[] ucRev   	= array(new Unsigned8[3]);
	};

	public static class SJH_NET_DEV_POINT extends Struct {
		public final Unsigned32 x = new Unsigned32();	
		public final Unsigned32 y = new Unsigned32();	
	};
	
	public static class SJH_NET_DEV_RECOG_PARAM extends Struct {
		public final SJH_NET_DEV_POINT[] Region = array(new SJH_NET_DEV_POINT[SJHLPRIPCConstant.SJH_LPR_REGION_POINTS]);
		public final Unsigned32 u32SameTime = new Unsigned32();	
	};

	public static class SJH_NET_DEV_SOFT_LENS extends Struct {
		public final Unsigned8 u8Zoom   = new Unsigned8();			//虚拟焦距
		public final Unsigned8[] u8Res   	= array(new Unsigned8[3]);
	};

	public static class SJH_NET_DEV_IMAGE_PARAM extends Struct {
		public final Unsigned8 u8JpgQulity   = new Unsigned8();			//jpg qulity 0-99
		public final Unsigned8[] u8Res   	= array(new Unsigned8[3]);
		public final Unsigned32 u32Width = new Unsigned32();		// 输出图片大小
		public final Unsigned32 u32Height = new Unsigned32();		// 高
	};

	public static class SJH_NET_DEV_LIGHT extends Struct {
		public final Unsigned32 u32Light = new Unsigned32();	
	};
	
	public static class SJH_NET_DEV_OPEN_DOOR_FIRST extends Struct {
		// 1: 相机先开闸，2: 收费系统开闸3  websocket连接成功，相机开闸, 4:白名单开闸,  其他: 服务器开闸
		public final Signed32 nOpenDoorFirst = new Signed32();
		// 1: 无牌车开闸,      其他: 无牌车不开闸
		public final Signed32 nNoPlateOpenDoor = new Signed32();
		//LED 屏IP
		public final Unsigned8[] szLedIP = array(new Unsigned8[SJHLPRIPCConstant.SJH_IPV4_MAX]);
	};
	
	public static class SJH_NET_DEV_WEBSOCKET_PARAM extends Struct {
		//Websocket 地址: ws://192.168.1.18:port/recv
		public final Unsigned8[] szURL   	= array(new Unsigned8[SJHLPRIPCConstant.SJH_URL_MAX]);
	};

	public static class SJH_NET_DEV_HTTP_URL_PARAM extends Struct {
		// http地址
		public final Unsigned8[] u8Url   	= array(new Unsigned8[SJHLPRIPCConstant.SJH_URL_MAX]);
	};
	
	public static class SJH_NET_DEV_LED_LINE extends Struct {
		public final Signed32 nLineNum = new Signed32();  // 行号
		//gbk2312 code
		public final Unsigned8[] szMessage = array(new Unsigned8[SJHLPRIPCConstant.SJH_MESSAGE_MAX]);
	};
	
	public static class SJH_NET_DEV_DISPLAY_MSG extends Struct {
		public final Unsigned16 wVendor = new Unsigned16();	// 厂商
		public final Unsigned16 wResv = new Unsigned16();	// 保留字节
		public final Unsigned8 ucModel = new Unsigned8();	// 型号
		public final Unsigned8 ucPotocol = new Unsigned8();	// 协议
		public final Unsigned8 ucVolum = new Unsigned8();	// 音量
		public final Unsigned8 ucLight = new Unsigned8();	// 屏亮度	
		
		// 显示屏IP	
		public final Signed8[] szScreenIP = array(new Signed8[SJHLPRIPCConstant.SJH_IPV4_MAX]);
		// 语音消息
		public final Signed8[] szVoiceMsg = array(new Signed8[SJHLPRIPCConstant.SJH_MESSAGE_MAX]);
	};
	
	public static class SJH_NET_DEV_DATE_TIME extends Struct {
		public final Unsigned16 u16Year = new Unsigned16();	// 年
		public final Unsigned8 u8Month = new Unsigned8();	// 月
		public final Unsigned8 u8Day = new Unsigned8();		
		public final Unsigned8 u8Hour = new Unsigned8();	
		public final Unsigned8 u8Minute = new Unsigned8();	
		public final Unsigned8 u8Second = new Unsigned8();	
		public final Unsigned8 u8Weekly = new Unsigned8();	
		public final Signed32 u32MisSecond = new Signed32();
		
		public ByteOrder byteOrder()
        {
        	return ByteOrder.LITTLE_ENDIAN;        	
        }
	};
	
	public static class SJHLPRDate extends Struct {
		public final Unsigned16 Year = new Unsigned16();	// 年
		public final Unsigned8 Month = new Unsigned8();	// 月
		public final Unsigned8 Day = new Unsigned8();	
	};

	public static class SJHLPRDWhiteListItem extends Struct {
		// 车牌号码
		public final Signed8[] szPlate = array(new Signed8[SJHLPRIPCConstant.SJH_LICENSE_MAX]);
		// 开始时间
		public final SJHLPRDate stStartDate = new SJHLPRDate();
		// 结束时间
		public final SJHLPRDate stOverDate = new SJHLPRDate();
		// 类型
		public final Unsigned32 ucType = new Unsigned32();
	};

	public static class SJHLPRDWhiteListItemBat extends Struct {
		// SJHLPRDWhiteListItem 的个数
		public final Unsigned32 nCount = new Unsigned32();
		// 白名单项目
		public final SJHLPRDWhiteListItem[] Items = array(new SJHLPRDWhiteListItem[SJHLPRIPCConstant.SJH_VIP_BAT_ITEMS_COUNT]);	
	};

	public static class SJH_NET_DEV_VERSION_INFOS extends Struct {
		// 硬件版本号
		public final Unsigned8[] u8HardVer = array(new Unsigned8[SJHLPRIPCConstant.SJH_MESSAGE_MAX]);
		// 软件版本号
		public final Unsigned8[] u8SoftVer = array(new Unsigned8[SJHLPRIPCConstant.SJH_MESSAGE_MAX]);
	};
	
	public static class SJH_NET_DEV_NET_CONFIG extends Struct {
		//设备IP
		public final Signed8[] IPAddr = array(new Signed8[SJHLPRIPCConstant.SJH_IPV4_MAX]);
		//子网掩码
		public final Signed8[] Netmask = array(new Signed8[SJHLPRIPCConstant.SJH_IPV4_MAX]);
		//网关		
		public final Signed8[] Gateway = array(new Signed8[SJHLPRIPCConstant.SJH_IPV4_MAX]);
		//主DNS服务器地址
		public final Signed8[] DNS1 = array(new Signed8[SJHLPRIPCConstant.SJH_IPV4_MAX]);
		//次DNS服务器地址
		public final Signed8[] DNS2 = array(new Signed8[SJHLPRIPCConstant.SJH_IPV4_MAX]);
		//MAC地址
		public final Signed8[] MACAddr = array(new Signed8[SJHLPRIPCConstant.SJH_IPV4_MAX]);
		//是否启用DHCP
		public final Unsigned8 EnableDHCP = new Unsigned8();	
		//是否允许自动获取DNS
		public final Unsigned8 EnableAutoDNS = new Unsigned8();
		//MTU大小默认 1500
		public final Unsigned8 Interface = new Unsigned8();
		//保留字节
		public final Unsigned8 u8Res = new Unsigned8();
		//网络接口 1-10MBase-T 2-10MBase-T全双工 3-100MBase-TX 4-100M全双工 5-10M/100M/1000M自适应
		public final Unsigned32 Mtu = new Unsigned32();
		
	};
	
	public static class SJH_NET_DEV_STATUS extends Struct {
		// 0 成功, -1 
		public final Signed32 nStatus = new Signed32();
		
		// 状态描述
		public final Signed8[] szStatusInfo = array(new Signed8[SJHLPRIPCConstant.SJH_STATUS_INFO_LEN]);
	};
	
	public static class SJH_NET_DEV_VIP_STATUS extends Struct {
		// 0 成功, -1 
		public final Signed32 nStatus = new Signed32();
		// 数量
		public final Signed32 nCount = new Signed32();
		
		public final Signed8[] szStatusInfo = array(new Signed8[SJHLPRIPCConstant.SJH_STATUS_VIP_INFO_LEN]);
	};
	
	public static class SJH_NET_DEV_MULTI_CAP_PARAM extends Struct {
		// 间隔
		public final Signed32 nCapStep = new Signed32();
		
		// 总共保存的文件数
		public final Signed32 nFileCount = new Signed32();
	};

	//|SJH_NET_DEV_MC_DATA|image data|plate image data|
	public static class SJH_NET_DEV_MC_DATA extends Struct {
		// 文件数
		public final Signed32 nFileCount = new Signed32();		
		// 文件索引
		public final Signed32 nFileIndex = new Signed32();
		// 图片数据
		public final SJH_LICENSE_RESULT result = new SJH_LICENSE_RESULT();
	};

	public static class SJH_NET_DEV_WS_LOG extends Struct {
		// 使能日志
		public final Signed32 nEnable = new Signed32();		
		// 日志优先级
		public final Signed32 nPriority = new Signed32();
		// 秒
		public final Unsigned16 u16HeatBeatInterval = new Unsigned16();
		// 日志websocket路径
		public final Unsigned8[] szURL = array(new Unsigned8[SJHLPRIPCConstant.SJH_URL_MAX]);
	};
	
	public static class SJH_NET_DEV_LOG_MSG extends Struct {
		// 消息
		public final Unsigned8[] szMsg = array(new Unsigned8[SJHLPRIPCConstant.SJH_LOG_MSG_LEN]);
		// SN
		public final Unsigned8[] szSN = array(new Unsigned8[SJHLPRIPCConstant.SJH_DEV_SN_MAX]);
	};

	public static class SJH_NET_DEV_PLATE_MATCH extends Struct 
	{
		// 车牌
		public final Unsigned8[] szPlate = array(new Unsigned8[SJHLPRIPCConstant.SJH_LICENSE_MAX]);
		// 匹配规则
		public final Unsigned8[] szRegexPlate = array(new Unsigned8[SJHLPRIPCConstant.SJH_LICENSE_MAX]);
	};

	public static class SJH_NET_DEV_PLATE_MATCH_LIST extends Struct 
	{
		public final Signed32 nCount = new Signed32();	
		
		public final SJH_NET_DEV_PLATE_MATCH[] Items = array(new SJH_NET_DEV_PLATE_MATCH[SJHLPRIPCConstant.SJH_MATCH_ITEM_MAX]);
	};

	public static class SJH_NET_DEV_LICENSE_RESULT_RES extends Struct 
	{
		// sid序列号	
		public final Unsigned32 u32MsgID = new Unsigned32();	
	};

	public static class SJH_NET_DEV_IMAGE_ASK extends Struct 
	{
		// 开启
		public final Signed32 nEnable = new Signed32();	
		// 发送间隔[没有收到应答后, 重新发送的间隔, 最小10秒]
		public final Signed32 nInterval = new Signed32();			
	};	
	
}
